// alert('hello world in TypeScript!');
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
function Add(left, right) {
    return left + right;
}
console.log(Add(1, 2));
function area(shape) {
    var area = shape.width * shape.height;
    return "I'm " + shape.name + " with area " + area + " cm squared";
}
console.log(area({ name: "rectangle", width: 30, height: 15 }));
console.log(area({ name: "square", width: 30, height: 30, color: "blue" }));
var People = (function () {
    function People(name, left, right) {
        this.name = name;
        this.name = name;
        this.size = left * right;
    }
    People.prototype.show = function () {
        return "this people name is " + this.name + " , size is " + this.size + " , color is " + this.color;
    };
    return People;
}());
var p = new People('xiaoming', 10, 2);
console.log(p.show());
console.log(p.name);
// console.log(p.size); // 编译error
var Student = (function (_super) {
    __extends(Student, _super);
    function Student(name, left, right, play) {
        var _this = _super.call(this, name, left, right) || this;
        _this.name = name;
        _this.play = play;
        return _this;
    }
    Student.prototype.show = function () {
        return "student play " + this.play;
    };
    Student.prototype.superShow = function () {
        return _super.prototype.show.call(this);
    };
    return Student;
}(People));
var s = new Student('db', 29, 2, 'ball');
console.log(s.show());
console.log(s.superShow());
